package com.ctl;

import java.io.File;
import java.util.StringJoiner;

/**
 * Hello world!
 */
public class App {
    public static void say() {
        String str = "nihao";
        System.out.println(str);
    }

    public static void main(String[] args) {
        say();
        StringJoiner joiner = new StringJoiner(",");
        for (int i = 0; i < 23; i++) {
            joiner.add("" + i);
        }
//        System.out.println(joiner);
        File file = new File("/home/ideaworkplace/gitee/util/lib");
        String[] list = file.list();
        for (int i = 0; i < list.length; i++) {
            String mvn = " <dependency>\n" +
                    "            <groupId>com.ctl</groupId>\n" +
                    "            <artifactId>artReq</artifactId>\n" +
                    "            <scope>system</scope>\n" +
                    "            <version>1.0.0</version>\n" +
                    "            <systemPath>${basedir}/lib/jarReq</systemPath>\n" +
                    "        </dependency>";
            mvn = mvn.replaceAll("jarReq", list[i]).replaceAll("artReq", list[i].split("\\.")[0]);
            System.out.println(mvn);
        }
    }
}
